﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 九方入库单
    /// </summary>
    /// 


    public class JF_AsnList
    {
        /// <summary>
        /// 用于分页查询
        /// </summary>
        public string ID { get; set; }
        public string RowId { get; set; }


        /// <summary>
        /// 入库单号
        /// </summary>
        public string receiving_code { get; set; }
        /// <summary>
        /// 客户参考号
        /// </summary>
        public string reference_no { get; set; }
        /// <summary>
        /// 合同号
        /// </summary>
        public string contract_no { get; set; }

        /// <summary>
        /// 入库单类型
        /// </summary>
        public string asn_type_;

        public string asn_type
        {
            get { return asn_type_; }

            set
            {

                if (value == "0") asn_type_ = "标准入库单";
                else if (value == "1") asn_type_ = "FBA入库单";
                else if (value == "2") asn_type_ = "FBA整箱备货";
                else asn_type_ = value;
            }

        }

        /// <summary>
        /// 中转类型，0中转代发，1自发头程
        /// </summary>
        public string transit_type_;

        public string transit_type
        {
            get { return transit_type_; }

            set
            {

                if (value == "0") transit_type_ = "中转代发";
                else if (value == "1") transit_type_ = "自发头程";
                else transit_type_ = value;
            }

        }
        /// <summary>
        /// 交货方式	
        /// </summary>
        public string tincome_type_;

        public string income_type
        {
            get { return tincome_type_; }

            set
            {

                if (value == "0") tincome_type_ = "自送";
                else if (value == "1") tincome_type_ = "揽收";
                else tincome_type_ = value;
            }

        }
        /// <summary>
        /// 目的仓库
        /// </summary>
        public string warehouse_code { get; set; }


        /// <summary>
        /// 交货仓库
        /// </summary>
        public string transit_warehouse_code { get; set; }

        /// <summary>
        /// 头程运输方式	
        /// </summary>
        public string sm_code { get; set; }
        /// <summary>
        /// 运输方式（自送时，需要填写到仓方式）	
        /// </summary>
        public string shipping_method { get; set; }
        /// <summary>
        /// 跟踪号	
        /// </summary>
        public string tracking_number { get; set; }
        /// <summary>
        /// 入库单状态	
        /// </summary>
        public string receiving_status_;

        public string receiving_status
        {
            get { return receiving_status_; }

            set
            {

                if (value == "C") receiving_status_ = "自送";
                else if (value == "W") receiving_status_ = "头程在途";
                else if (value == "P") receiving_status_ = "头程收货中";
                else if (value == "T") receiving_status_ = "头程收货完成";
                else if (value == "Z") receiving_status_ = "转运中";
                else if (value == "G") receiving_status_ = "目的仓库收货中";
                else if (value == "F") receiving_status_ = "目的仓收货完成";
                else if (value == "E") receiving_status_ = "完成上架";
                else if (value == "X") receiving_status_ = "废弃";
                else receiving_status_ = value;
            }
        }
        /// <summary>
        /// 入库单说明	
        /// </summary>
        public string receiving_desc { get; set; }

        /// <summary>
        /// 预计到达日期
        /// </summary>
        public string eta_date { get; set; }

        /// <summary>
        /// 创建日期	
        /// </summary>
        public string receiving_add_time { get; set; }

        /// <summary>
        /// 修改日期	
        /// </summary>
        public string receiving_modify_time { get; set; }

        /// <summary>
        /// 目的仓收货时间
        /// </summary>
        public string warehouse_receiving_time { get; set; }

        /// <summary>
        /// 目的仓收货完成时间
        /// </summary>
        public string warehouse_receiving_complete_time { get; set; }

        /// <summary>
        /// 目的仓上架时间
        /// </summary>
        public string warehouse_shelf_time { get; set; }

        /// <summary>
        /// 揽收支持的省ID， 参考getRegionForReceiving
        /// </summary>
        public string region_id_level0 { get; set; }
        /// <summary>
        /// 揽收支持的市ID， 参考getRegionForReceiving
        /// </summary>
        public string region_id_level1 { get; set; }
        /// <summary>
        /// 揽收支持的区ID， 参考getRegionForReceiving
        /// </summary>
        public string region_id_level2 { get; set; }
        /// <summary>
        /// 揽收地址
        /// </summary>
        public string street { get; set; }
        /// <summary>
        /// 联系人，交货方式为揽收时，必填
        /// </summary>
        public string contacter { get; set; }
        /// <summary>
        /// 联系电话，交货方式为揽收时，必填
        /// </summary>
        public string contact_phone { get; set; }
        /// <summary>
        /// 总箱数
        /// </summary>
        public string box_total { get; set; }
        /// <summary>
        /// 产品总数
        /// </summary>
        public string sku_total { get; set; }
        /// <summary>
        /// SKU种类
        /// </summary>
        public string sku_species { get; set; }
        /// <summary>
        /// 计费时间
        /// </summary>
        public string calculate_fee_time { get; set; }
        /// <summary>
        /// VAT税号
        /// </summary>
        public string vat_tax_code { get; set; }
        /// <summary>
        /// 入库单成本
        /// </summary>
        public object receiving_cost { get; set; }
        /// <summary>
        /// 总成本
        /// </summary>
        public string receiving_cost_total_cost { get; set; }
        /// <summary>
        /// 运输费
        /// </summary>
        public string receiving_cost_shipping_cost { get; set; }
        /// <summary>
        /// 报关费
        /// </summary>
        public string receiving_cost_ccf_cost { get; set; }
        /// <summary>
        /// 关税
        /// </summary>
        public string receiving_cost_dt_cost { get; set; }
        /// <summary>
        /// 其他费用
        /// </summary>
        public string receiving_cost_other_cost { get; set; }
        /// <summary>
        /// 客户币种
        /// </summary>
        public string receiving_cost_customer_currency { get; set; }

        public class Receiving_Cost
        {
            /// <summary>
            /// 总成本
            /// </summary>
            public string total_cost { get; set; }
            /// <summary>
            /// 运输费
            /// </summary>
            public string shipping_cost { get; set; }
            /// <summary>
            /// 报关费
            /// </summary>
            public string ccf_cost { get; set; }
            /// <summary>
            /// 关税
            /// </summary>
            public string dt_cost { get; set; }
            /// <summary>
            /// 其他费用
            /// </summary>
            public string other_cost { get; set; }
            /// <summary>
            /// 客户币种
            /// </summary>
            public string customer_currency { get; set; }


        }





        /// <summary>
        /// 入库单库存类型	
        /// </summary>
        public string stock_type_;

        public string stock_type
        {
            get { return stock_type_; }

            set
            {

                if (value == "0") stock_type_ = "以仓库为准";
                else if (value == "1") stock_type_ = "标准区";
                else if (value == "2") stock_type_ = "暂存区";
                else if (value == "5") stock_type_ = "以箱为准";
                else stock_type_ = value;
            }
        }
        /// <summary>
        /// 货柜类型	
        /// </summary>
        public string container_type_;

        public string container_type
        {
            get { return container_type_; }

            set
            {

                if (value == "0") container_type_ = "";
                else if (value == "1") container_type_ = "20GP";
                else if (value == "3") container_type_ = "40GP";
                else if (value == "4") container_type_ = "45GP";
                else if (value == "5") container_type_ = "45HQ";
                else if (value == "6") container_type_ = "53HQ";
                else if (value == "7") container_type_ = "20HQ";
                else container_type_ = value;
            }
        }
        /// <summary>
        /// 散货类型(托)	
        /// </summary>
        public string bulk_cargo_type_;

        public string bulk_cargo_type
        {
            get { return bulk_cargo_type_; }

            set
            {

                if (value == "0") bulk_cargo_type_ = "否";
                else if (value == "1") bulk_cargo_type_ = "是";
                else bulk_cargo_type_ = value;
            }
        }
        /// <summary>
        /// 散货类型为托时的托数量
        /// </summary>
        public string pallet_cnt { get; set; }

        /// <summary>
        /// 散货类型（件）	
        /// </summary>
        public string bulk_cargo_type_piece_;

        public string bulk_cargo_type_piece
        {
            get { return bulk_cargo_type_piece_; }

            set
            {

                if (value == "0") bulk_cargo_type_piece_ = "否";
                else if (value == "1") bulk_cargo_type_piece_ = "是";
                else bulk_cargo_type_piece_ = value;
            }
        }


        /// <summary>
        /// 入库产品详情
        /// </summary>
        public List<Items> items { get; set; }
        /// <summary>
        /// SKU
        /// </summary>
        public string items_product_sku { get; set; }
        /// <summary>
        /// 产品编码
        /// </summary>
        public string items_product_barcode { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public string items_quantity { get; set; }
        /// <summary>
        /// 收货数
        /// </summary>
        public string items_received_quantity { get; set; }
        /// <summary>
        /// 上架数
        /// </summary>
        public string items_putaway_qty { get; set; }
        /// <summary>
        /// 箱号
        /// </summary>
        public string items_box_no { get; set; }
        /// <summary>
        /// 库位类型统计数量,数组三条数据分表代表良品库位数量，不良品库位数量，暂存库位数量
        /// </summary>
        public object loCountType { get; set; }
        /// <summary>
        /// 上架数量
        /// </summary>
        public string items_putaway_quantity { get; set; }
        /// <summary>
        /// 产品单价
        /// </summary>
        public string items_product_price { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public string items_rd_update_time { get; set; }
        /// <summary>
        /// 箱维度库存类型
        /// </summary>

        public string items_inventory_type { get; set; }
        /// <summary>
        /// 日期
        /// </summary>
        public string items_product_date { get; set; }


        /// <summary>
        /// 仓库属性-长
        /// </summary>
        public string items_warehouse_attr_product_length { get; set; }
        /// <summary>
        /// 仓库属性-宽
        /// </summary>
        public string items_warehouse_attr_product_width { get; set; }
        /// <summary>
        /// 仓库属性-高
        /// </summary>
        public string items_warehouse_attr_product_height { get; set; }
        /// <summary>
        /// 仓库属性-重量
        /// </summary>
        public string items_warehouse_attr_product_weight { get; set; }



        /// <summary>
        /// 产品成本
        /// </summary>
        public object product_cost { get; set; }

        public class Items
        {
            /// <summary>
            /// SKU
            /// </summary>
            public string product_sku { get; set; }
            /// <summary>
            /// 产品编码
            /// </summary>
            public string product_barcode { get; set; }
            /// <summary>
            /// 数量
            /// </summary>
            public string quantity { get; set; }
            /// <summary>
            /// 收货数
            /// </summary>
            public string received_quantity { get; set; }
            /// <summary>
            /// 上架数
            /// </summary>
            public string putaway_qty { get; set; }
            /// <summary>
            /// 箱号
            /// </summary>
            public string box_no { get; set; }
            /// <summary>
            /// 库位类型统计数量,数组三条数据分表代表良品库位数量，不良品库位数量，暂存库位数量
            /// </summary>
            public object loCountType { get; set; }
            /// <summary>
            /// 上架数量
            /// </summary>
            public string putaway_quantity { get; set; }
            /// <summary>
            /// 产品单价
            /// </summary>
            public string product_price { get; set; }
            /// <summary>
            /// 更新时间
            /// </summary>
            public string rd_update_time { get; set; }
            /// <summary>
            /// 箱维度库存类型
            /// </summary>
            public string inventory_type_;

            public string inventory_type
            {
                get { return inventory_type_; }

                set
                {

                    if (value == "0") inventory_type_ = "按仓库确认";
                    else if (value == "1") inventory_type_ = "标准";
                    else if (value == "2") inventory_type_ = "暂存";
                    else inventory_type_ = value;
                }
            }
            /// <summary>
            /// 日期
            /// </summary>
            public string product_date { get; set; }
            /// <summary>
            /// 入库单产品每一种库位类型的数量
            /// </summary>
            public object loTypeCount { get; set; }
            /// <summary>
            /// 产品仓库属性
            /// </summary>
            public object warehouse_attr { get; set; }

            public class Warehouse_Attr
            {
                /// <summary>
                /// 仓库属性-长
                /// </summary>
                public string product_length { get; set; }
                /// <summary>
                /// 仓库属性-宽
                /// </summary>
                public string product_width { get; set; }
                /// <summary>
                /// 仓库属性-高
                /// </summary>
                public string product_height { get; set; }
                /// <summary>
                /// 仓库属性-重量
                /// </summary>
                public string product_weight { get; set; }


            }
            /// <summary>
            /// 产品成本
            /// </summary>
            public object product_cost { get; set; }
        }

        /// <summary>
        /// 装箱信息
        /// </summary>
        public List<Box_Info> box_info { get; set; }


        public class Box_Info
        {
            /// <summary>
            /// 箱子号
            /// </summary>
            public string box_no { get; set; }

            /// <summary>
            /// 箱子长；默认单位：CM
            /// </summary>
            public string box_length { get; set; }

            /// <summary>
            /// 箱子宽；默认单位：CM
            /// </summary>
            public string box_width { get; set; }

            /// <summary>
            /// 箱子高；默认单位：CM
            /// </summary>
            public string box_height { get; set; }

            /// <summary>
            /// 箱子重量；默认单位：KG
            /// </summary>
            public string box_weight { get; set; }


        }
        /// <summary>
        /// 库存批次号信息
        /// </summary>
        public List<Batch_Info> batch_info { get; set; }


        public class Batch_Info
        {
            /// <summary>
            /// 产品sku
            /// </summary>
            public string product_sku { get; set; }

            /// <summary>
            /// 产品代码
            /// </summary>
            public string product_barcode { get; set; }

            /// <summary>
            /// 产品数量
            /// </summary>
            public string sku_quantity { get; set; }

            /// <summary>
            /// 产品库存批次号
            /// </summary>
            public string inventory_code { get; set; }

            /// <summary>
            /// 库存类型,0:标准 1:不良品,2暂存
            /// </summary>
            public string ib_type_;

            public string ib_type
            {
                get { return ib_type_; }

                set
                {

                    if (value == "0") ib_type_ = "标准";
                    else if (value == "1") ib_type_ = "不良品";
                    else if (value == "2") ib_type_ = "暂存";
                    else ib_type_ = value;
                }
            }

            /// <summary>
            /// 上架时间
            /// </summary>
            public string warehouse_shelf_time { get; set; }
        }

        /// <summary>
        /// 上架记录
        /// </summary>
        public List<Shelf_Inventory_Records> shelf_inventory_records { get; set; }


        public class Shelf_Inventory_Records
        {
            /// <summary>
            /// 产品代码
            /// </summary>
            public string product_barcode { get; set; }
            /// <summary>
            /// 产品数量
            /// </summary>
            public string sku_quantity { get; set; }
            /// <summary>
            /// 库存类型,0:标准 1:不良品,2暂存
            /// </summary>
            public string ib_type_;

            public string ib_type
            {
                get { return ib_type_; }

                set
                {

                    if (value == "0") ib_type_ = "标准";
                    else if (value == "1") ib_type_ = "不良品";
                    else if (value == "2") ib_type_ = "暂存";
                    else ib_type_ = value;
                }
            }
            /// <summary>
            /// 上架时间
            /// </summary>
            public string warehouse_shelf_time { get; set; }

        }
    }

}
